@extends('layouts.admin')

@section('maincontent')
    <div class="page-records page">


        <div class="page-title">
            <div class="title">记录列表</div>
        </div>

        <table class="table table-bordered">
            <thead>
            <tr>
                <th>#</th>
                <th>用户</th>
                <th>记录时长</th>
                <th>上传耗时</th>
                <th>开始时间</th>
                <th>查看</th>
            </tr>
            </thead>
            <tbody>

            @foreach($records as $key => $record)
                <tr>
                    <td>{{$record->log_id}}</td>
                    <td>{{$record->wx_name}}</td>
                    <td>{{$record->time}}</td>
                    <td>{{$record->passed_time}}</td>
                    <td>{{$record->created_at}}</td>
                    <td>
                        <a href="{{asset($record->file)}}" class="btn btn-sm btn-primary" target="_blank">原始数据</a>
                        <a href="{{asset("admin/recordmap?logId=".$record->log_id)}}" class="btn btn-sm btn-danger">曲线图</a>
                    </td>
                </tr>
            @endforeach
            </tbody>
        </table>
        <div>
            {{ $records->appends(['userId' => $userId])->links() }}
        </div>
    </div>
@endsection